<?php
// $oJobs = JobHandler::getJobs(); // To kill?
$sMissionViews = array(
	'mission-show_properties' => msg('Attributes'),
	'mission-show_changes' => msg('Change history'),
	'mission-show_work' => msg('Work history')
);

if (!@$sMissionViews[$_REQUEST['sView']] || !$_REQUEST['sView']) {
	$sView = 'mission-show_properties';
}
else {
	$sView = $_REQUEST['sView'];
}
?>

<div id="layer_mission_show" class="hidden" style="visibility: visible;">
<table class="boxborder" cellspacing="0">
	<tr>
		<td class="boxhandle"><?php print msg('Task') ?>: <?php print $sMissionViews[$sView] ?></td>
	</tr>
	<tr>
		<td class="clear">
			<table cellspacing="0" style="width: 100%;">
				<tr>
					<td class="control small">
<?php
foreach ($sMissionViews as $sPage => $sCaption)
{
	print '<a href="javascript: getPiece(\''.$sPage.'\', \'iMissionID='.$_REQUEST['iMissionID'].'\', \'holder_mission_page\');">'.$sCaption.'</a> | ';
}
?>
					</td>
<?php
if (JobHandler::canDo('mission', 'write'))
{
	print '<td class="control right"><input type="button" value="'.msg('Delete task').'" onClick="showBox(\'mission-delete\', \'iMissionID='.$_REQUEST['iMissionID'].'\');"></td>';
}
?>
				</tr>
			</table>
		</td>
	</tr>
	<tr>
		<td class="clear" id="holder_mission_page">
			<?php loadBox($sView); ?>
		</td>
	</tr>
</table>
</div>

